package es.xpt.ysf.commons.business;

import java.security.Principal;
import java.util.ResourceBundle;

import es.xpt.ysf.dao.Connection;
import es.xpt.ysf.dao.DAOErrors;
import es.xpt.ysf.dao.DAOException;
import es.xpt.ysf.dao.DbDAOFactory;

public class BusinessDAOFactory extends DbDAOFactory {
	
	private static DAOErrors errors = new DAOErrors(ResourceBundle.getBundle("es.xpt.ysf.commons.business.BusinessErrorMessages"));

	protected BusinessDAOFactory( Principal principal ) throws DAOException {
		super(principal);
    }
	
	public BusinessDAOFactory( Connection con, Principal principal ) throws DAOException { // NO_UCD
		super( con, principal);
    }
	
	public RemarkDAO getRemarkDAO() {
	  return new RemarkDAO(con, principal, errors);
    }
	
	public PeriodDAO getPeriodDAO() {
	   return new PeriodDAO(con, principal, errors);
	}
	
	public CurrencyDAO getCurrencyDAO() {
	   return new CurrencyDAO(con, principal, errors);
	}
}